// component/signal/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    signal : {
      type: Number,
      value: 0
    }
  },

  observers : {
    signal (signal) {
      let grid = 0
      if (signal >= 26) {
        grid = 5
      } else if (signal >= 20) {
        grid = 4
      } else if (signal >= 14) {
        grid = 3
      } else if (signal >= 8) {
        grid = 2
      } else if (signal >= 1) {
        grid = 1
      } else {
        grid = 0
      }
      this.setData({ grid: grid})

    }
  },

  data: {
    list : [1, 2, 3, 4, 5],
    grid : 0
  },

  /**
   * 组件的方法列表
   */
  methods: {

  }
})
